import java.util.LinkedList;

public class Test {
    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(1);
        myLinkedList.display();
        System.out.println("===============");
        myLinkedList.remove(1);
        myLinkedList.display();
        System.out.println("===============");
        myLinkedList.removeAllKey(1);
        myLinkedList.display();
    }
    public static void main01(String[] args) {
        //LinkedList 是双向链表
        LinkedList<Integer> list = new LinkedList<>();

        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(3);
        myLinkedList.addFirst(4);
        myLinkedList.display();
    }
}
